import request from '@/utils/request'

// 获取角色列表
export function getRolesList () {
  return request({
    url: 'roles',
    method: 'get'
  })
}

// 删除角色
export function deleteRole (id) {
  return request({
    url: `roles/${id}`,
    method: 'delete'
  })
}

// 编辑用户角色
export function editUserRole (id, data) {
  return request({
    url: `roles/${id}`,
    method: 'put',
    data
  })
}
